package com.cloudbroker.bcs.common.util;

public enum ExtendAppCodeConvert {
	
	viewpoint("viewpoint","talk"),
	chat("chat","message"),
	question("question","faq"),
	system("system",null),
	fund("fund",null);
	
	
	private ExtendAppCodeConvert(String davCode,String fansCode){
		this.fansCode = fansCode;
		this.davCode = davCode;
	}
	
	public static String getFansCode(String davCode){
		ExtendAppCodeConvert [] codes = ExtendAppCodeConvert.values();
		for (ExtendAppCodeConvert c : codes) {
			if(c.getDavCode().equals(davCode)){
				return c.getFansCode();
			}
		}
		return "";
	}

	private String fansCode;
	private String davCode;
	public String getFansCode() {
		return fansCode;
	}
	public void setFansCode(String fansCode) {
		this.fansCode = fansCode;
	}
	public String getDavCode() {
		return davCode;
	}
	public void setDavCode(String davCode) {
		this.davCode = davCode;
	}
	
	
}
